<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<link rel="stylesheet" href="${basePath}/static/plugins/datepicker/bootstrap-datetimepicker.css">
<link rel="stylesheet" href="${basePath}/static/plugins/datatables/dataTables.bootstrap.css">
<link rel="stylesheet" href="${basePath}/static/plugins/wangEditor2.1.22/dist/css/wangEditor.min.css">
<style>
#goods_grid_info{display:none;}
#goodsBoy .col-sm-2{padding-left:0;}
#goodsBoy .col-sm-10{padding-left:0;}
.upload-img{margin-right:20px;display:inline-block;position:relative;}
.upload-img img{width:95px;height:95px;border-radius:5px;}
.upload-img2{width:95px;height:95px;border-radius:5px;margin-left:10px;}
.error-border{border:1px solid red;border-color:red;}
.table>tbody>tr>td{vertical-align: middle !important;}
.f-hide{display:none;}
</style>
<section class="content-header">
	<ol class="breadcrumb">
		<li><i class="fa fa-dashboard"></i>后台管理</li>
		<li class="active">商品类型管理</li>
	</ol>
</section>
<div class="content">
	<div class="panel panel-info">
		<div class="panel-heading">商品查询</div>
	  	<div class="panel-body">
			<!-- 查询列表  start-->
			<form id="goodsSearchForm">
		    	<div class="row" role="form">
				  	<div class="form-group form-inline col-sm-12 text-center">
				    	<label for="subActor">商品名称:</label>
				    	<input type="text" class="form-control" name="goodsName" style="width:160px;margin-right:20px;" placeholder="输入商品名称">
				    	<label for="subActor">品牌:</label>
				    	<input type="text" class="form-control" name="goodsBrand" style="width:160px;margin-right:20px;" placeholder="输入商品品牌">
				    	<label for="subActor">规格:</label>
				    	<input type="text" class="form-control" name="goodsSpecification" style="width:160px;margin-right:20px;" placeholder="输入商品规格">
				    	<label for="subActor">商品状态:</label>
				    	<select class="form-control" name="status" style="width:100px;margin-right:20px;">
				    		<option value="">全部</option>
				    		<option value="0">上架</option>
				    		<option value="1">下架</option>
				    		<option value="2">过期</option>
				    	</select>
				    	<!-- <input type="text" class="form-control" name="name" style="width:160px;margin-right:20px;" placeholder="输入模板类型名称"> -->
					  	<button type="button" class="btn btn-info" style="width: 120px;margin-right:20px;" id="searchGoods">查   询</button>
					  	<!-- <button type="button" class="btn btn-success" style="width: 120px;" id="addType">添   加</button> -->
				  	</div>
				  	<!-- <div class="form-group form-inline col-sm-4 text-left">
				  	</div>
				  	<div class="col-sm-2 text-left" >
				  	</div> -->
			  	</div>
			</form>
			<!-- 查询列表  end -->
			<br>
			<div class="toolBar" style="margin: 5px;">
				<button type="button" id="goodsAdd" class="btn btn-success btn-xs add-type"
					style="width: 80px;">新&nbsp;&nbsp;增</button>
				<button type="button" id="goodsDel" class="btn btn-danger btn-xs"
					style="width: 80px;">删&nbsp;&nbsp;除</button>
			</div>
			<!-- 日志表格内容 start-->
			<table id="goods_grid" class="table table-bordered table-hover text-center">
			    <thead>
			    	<tr>
				    	<th style="padding-right:5px;"><input type="checkbox" name="checkAll" id="typeCheckAll"></th>
				    	<th>序号</th>
						<th>图片</th>
				    	<th>名称</th>
				    	<th>品牌</th>
						<th>规格</th>
						<!-- <th>描述</th> -->
						<th>状态</th>
						<th>有效时间</th>
						<th>操作</th>
				    </tr>
			    </thead>
			</table>
			<!-- 日志表格内容 end -->
	  	</div>
	</div>
</div>
<!-- 商品添加或修改模态框 -->
<div class="modal fade" id="goods_modal" tabindex="-1" role="dialog">
	<form id="goods_from">
		<div class="modal-dialog" style="width:900px;">
			<div class="modal-content">
				<div class="modal-body  no-padding">
					<div class="box box-primary">
						<div class="box-header with-border">
							<h3 class="box-title"><span id="editGoods">新增</span>商品信息</h3>
							<button data-dismiss="modal" class="close" type="button">关闭</button>
						</div>
						
						<div class="box-body" id="goodsBoy">
							<input type="hidden" name="id">
							<input type="hidden" name="fileNames">
							<input type="hidden" name="url">
							<div class="form-group row">
								<div class="col-sm-2 text-right">
									<label>商品名称：</label> 
								</div>
								<div class="col-sm-10"><input type="text" class="form-control requiredElem" name="goodsName" placeholder="请输入商品名称"></div>
							</div>
							<div class="form-group row">
								<div class="col-sm-2 text-right"><label>商品品牌：</label></div> 
								<div class="col-sm-10"><input type="text" class="form-control" name="goodsBrand" placeholder="请输入商品品牌"></div>
							</div>
							<div class="form-group row">
								<div class="col-sm-2 text-right"><label>商品规格：</label> </div>
								<div class="col-sm-10 "><input type="text" class="form-control" name="goodsSpecification" placeholder="请输入商品规格"></div>
							</div>
							<div class="form-group row">
								<div class="col-sm-2 text-right"><label>有效时间：</label>  </div>
								<div class="col-sm-10"><input type="text" class="form-control requiredElem" id="validDate" name="validDate" placeholder="选择日期"></div>
							</div>
							<div class="form-group row">
								<div class="col-sm-2 text-right"><label>积分兑换：</label>  </div>
								<div class="col-sm-10">
									<div style="position:relative;">
										<input type="text" class="form-control requiredElem" style="width:218px;" name="exchangeScore" id="exchangeScore" placeholder="兑换商品积分">
										<div style="position:absolute;left:150px;top:0;display:inline;border:1px solid #d2d6de;height:34px;width:34px;text-align:center;cursor:pointer;">
											<span class="glyphicon glyphicon-plus" style="margin-top:9px;"></span>
										</div>
										<div style="position:absolute;left:182px;top:0;display:inline;border:1px solid #d2d6de;height:34px;width:35px;text-align:center;cursor:pointer;">
											<span class="glyphicon glyphicon-minus" style="margin-top:9px;"></span>
										</div>
									</div>
								</div>
							</div>
							<div class="form-group row" style="height:200px;min-height:200px;">
								<div class="col-sm-2 text-right"><label>商品描述：</label>  </div>
								<div class="col-sm-10"><textarea class="form-control" style="height:140px;" name="goodsDesc" id="goodsEditor"></textarea></div>
							</div>
							<div class="form-group row">
								<div class="col-sm-2 text-right"><label>上传图片：</label> </div>
								<div class="col-sm-10">
									<img alt="" src="${basePath}/static/adminLTE/img/plus_96.png" class="upload-img" id="uploadImg"/>
								</div>
							</div>
							<div class="form-group row f-hide" id="down">
								<div class="col-sm-2 text-right"><label>是否下架：</label></div>
								<div class="col-sm-10 text-left">
									<input type="checkBox" name="status" value="1">
								</div>
							</div>
						</div>
						
					</div>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
					<a href="javascript:;" role="button" id="saveGoods" class="btn btn-primary">保存</a>
				</div>
			</div>
		</div>
	</form>
</div>
<form style="display:none;" id="uploadForm"><input type="file" name="file" id="uploadFileBtn" accept="image/*"><input type="hidden" name="url" id="tempUrl"></form>
﻿<div id="ShowImage_Form" class="modal fade" tabindex="-1" role="dialog">  
	<div class="modal-dialog" style="width:80%;">
		<div class="modal-content">
	       <div class="modal-header">
	           <button data-dismiss="modal" class="close" type="button">关闭</button>
	       </div>
	       <div class="modal-body">
	           <div id="img_show" style="height:80%;"></div>
	       </div>
		</div>
	</div>       
</div>
<script src="${basePath}/static/plugins/datepicker/bootstrap-datetimepicker.js"></script>
<script src="${basePath}/static/plugins/datepicker/locales/bootstrap-datetimepicker.zh-CN.js"></script>
<script src="${basePath}/static/plugins/datatables/jquery.dataTables.js"></script>
<script src="${basePath}/static/plugins/datatables/dataTables.bootstrap.js"></script>
<script type="text/javascript" src="${basePath}/static/plugins/jquery.validate/jquery.validate.min.js"></script>
<script type="text/javascript" src="${basePath}/static/plugins/wangEditor2.1.22/dist/js/wangEditor.js"></script>

<script src="${basePath}/static/adminLTE/js/goods/goods.js"></script>

